home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / bloop.swf / scripts / DefineSprite_213_background / frame_1 / DoAction.as
Text File  |  2007-09-27  |  1KB  |  34 lines

  1. depth = 0;
  2. this.back.gotoAndStop(_root.level);
  3. go = 0;
  4. while(go < 10)
  5. {
  6.    depth++;
  7.    attachMovie("background_bubble","bubble" + depth,depth);
  8.    eval("bubble" + depth).gotoAndStop(_root.level);
  9.    eval("bubble" + depth)._x = random(Stage.width);
  10.    eval("bubble" + depth)._y = random(Stage.height);
  11.    eval("bubble" + depth)._width = random(40) + 2;
  12.    eval("bubble" + depth)._height = eval("bubble" + depth)._width;
  13.    eval("bubble" + depth).moveSpeed = random(2) + 1;
  14.    go++;
  15. }
  16. _root.setFrame(this);
  17. onEnterFrame = function()
  18. {
  19.    _root.checkFrame(this);
  20.    this.back.gotoAndStop(_root.level);
  21.    num = random(10);
  22.    if(num == 1)
  23.    {
  24.       depth++;
  25.       attachMovie("background_bubble","bubble" + depth,depth);
  26.       eval("bubble" + depth).gotoAndStop(_root.level);
  27.       eval("bubble" + depth)._x = random(Stage.width);
  28.       eval("bubble" + depth)._y = Stage.height + 50;
  29.       eval("bubble" + depth)._width = random(40) + 2;
  30.       eval("bubble" + depth)._height = eval("bubble" + depth)._width;
  31.       eval("bubble" + depth).moveSpeed = random(2) + 1;
  32.    }
  33. };
  34.